home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / syscall / Sig_Pause.c < prev   
Encoding:
C/C++ Source or Header  |  1992-02-09  |  1.5 KB  |  56 lines

  1. /* 
  2.  * Sig_Pause.c --
  3.  *
  4.  *    Source code for the Sig_Pause library procedure.
  5.  *
  6.  * Copyright 1988 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  */
  15.  
  16. #ifndef lint
  17. static char rcsid[] = "$Header: /sprite/src/lib/c/syscall/RCS/Sig_Pause.c,v 1.2 88/06/21 11:14:50 ouster Exp $ SPRITE (Berkeley)";
  18. #endif not lint
  19.  
  20. #include <sprite.h>
  21. #include <status.h>
  22. #include <sig.h>
  23.  
  24.  
  25. /*
  26.  *----------------------------------------------------------------------
  27.  *
  28.  * Sig_Pause --
  29.  *
  30.  *      The "normal" Sig_Pause routine for user code.   This retries
  31.  *    the Sig_Pause in the event the return status is
  32.  *    GEN_INTERRUPTED_BY_SIGNAL since that return code means the process
  33.  *     was migrated during the Sig_Pause.
  34.  *
  35.  * Results:
  36.  *    An error code.
  37.  *
  38.  * Side effects:
  39.  *    The process is put to sleep awaiting a signal.
  40.  *
  41.  *----------------------------------------------------------------------
  42.  */
  43.  
  44. ReturnStatus
  45. Sig_Pause(sigHoldMask)
  46.     int    sigHoldMask;    /* The value that the mask of held signals is to be set
  47.                to while waiting for a signal to arrive. */
  48. {
  49.     ReturnStatus status;
  50.  
  51.     do {
  52.     status = Sig_RawPause(sigHoldMask);
  53.     } while (status == GEN_ABORTED_BY_SIGNAL);
  54.     return(status);
  55. }
  56.